#ifndef COMPILER_ONLINE
#include "header.cpp"
#endif

void Test1() {
    int ret = Solution().myAtoi("42");
    if (ret == 42) {
        std::cout << "Test1 ok!" << std::endl;
    } else {
        std::cout << "Test1 failed! input: \"42\", output expected 42, actual " << ret << std::endl;
    }
}

void Test2() {
    int ret = Solution().myAtoi("   -42");
    if (ret == -42) {
        std::cout << "Test2 ok!" << std::endl;
    } else {
        std::cout << "Test2 failed! input: \"   -42\", output expected -42, actual " << ret << std::endl;
    }
}

void Test3() {
    int ret = Solution().myAtoi("4193 with words");
    if (ret == 4193) {
        std::cout << "Test3 ok!" << std::endl;
    } else {
        std::cout << "Test3 failed! input: \"4193 with words\", output expected 4193, actual " << ret << std::endl;
    }
}

void Test4() {
    int ret = Solution().myAtoi("words and 987");
    if (ret == 0) {
        std::cout << "Test4 ok!" << std::endl;
    } else {
        std::cout << "Test4 failed! input: \"words and 987\", output expected 0, actual " << ret << std::endl;
    }
}

void Test5() {
    int ret = Solution().myAtoi("-91283472332");
    if (ret == INT_MIN) {
        std::cout << "Test5 ok!" << std::endl;
    } else {
        std::cout << "Test5 failed! input: \"-91283472332\", output expected " << INT_MIN << ", actual " << ret << std::endl;
    }
}

int main() {
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    return 0;
}